package demo1;

public class Animal {
    protected String name;
    protected int age;
    protected String className;

    static {
        System.out.println("Animal 静态块");
    }

    {
        System.out.println("Animal 实例块");
    }

    public void eat(){
        System.out.println(this.name + " Animal 正在吃饭");
    }

    public void textA(){
        System.out.println("Animal  textA");
    }

    public Animal(String name, int age, String className) {
        this.name = name;
        this.age = age;
        this.className = className;
        System.out.println("Animal 初始化");
    }
}
